#!/usr/bin/env python
import sys
import class_set
import helper
from sets import Set

class FilterListReducer(helper.ReducerHelper):
    def loader(self, line):
        line = line.strip()
        left, right = line.split('\t')
        node = class_set.UserNode()
        node.init(right)
        return (left, node)

    def processor(self, key, lst):
        for node in lst:
            recom_tag = class_set.RecomTag('filter')
            recom_tag.setTime(node.getTime())
            self.allocator(self.join(key, node.getId()), recom_tag)


def main():
    fr = FilterListReducer()
    fr.reducer()

if __name__ == '__main__':
    main()









